<template>
  <el-container class="home">
    <div class="aside">
      <Aside></Aside>
    </div>
    <el-container>
      <el-header><Header></Header></el-header>
      <el-main>
        <transition name="el-fade-in-linear">
          <router-view></router-view>
        </transition>
      </el-main>
      <!-- <el-footer>Footer</el-footer> -->
    </el-container>
  </el-container>
</template>

<script>
import Header from "@/components/header.vue";
import Aside from "@/components/aside.vue";

import { getCookie, setCookie } from "@/uitils/cookie";

export default {
  name: "",
  data() {
    return {};
  },
  watch: {},
  props: {},
  components: {
    Header,
    Aside
  },
  computed: {},
  mounted() {
    if (!getCookie("eks_cache_keys")) {
      //每次进入页面初始化缓存
      window.localStorage.removeItem("tokenLogin");
      // setCookie("eks_cache_keys", true);
      this.$router.push("/login");
    }
  },
  methods: {},
  filters: {}
};
</script>

<style scoped lang="scss">
.home {
  height: 100%;
}

.el-header,
.el-footer {
  background-color: #b3c0d1;
  color: #333;
  text-align: center;
  line-height: 60px;
}

.aside {
  background-color: #545c64;
  color: #333;
  text-align: left;
  line-height: 200px;
  transition: all 1s;
}

.el-main {
  background-color: #e9eef3;
  color: #333;
  text-align: center;
  line-height: 30px;
}

body > .el-container {
  margin-bottom: 40px;
}

.el-container .el-aside {
  line-height: 300px;
}
</style>
